package com.petadoption.serverclient.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.petadoption.serverclient.entity.Pet;
import com.petadoption.serverclient.vo.PetVO;
import org.apache.ibatis.annotations.SelectKey;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author 汪仕杰
 * @since 2023-08-28
 */
public interface IPetService extends IService<Pet> {

    List<PetVO> findPetAll();

    List<PetVO> findPet(String parameter);

    PetVO findPetById(int id);

    int delById(Integer id);

    @SelectKey(statement = "select LAST_INSERT_ID()", keyProperty = "pet_id", before = false, resultType = Long.class)
    int addPet(Pet pet);


}
